<script language="JavaScript">
(function($) {
    $(document).ready(function() {
    	var ajax_load = "<img src='<?=TMVC_MEDIA_BASEURL?>image/loading.gif' alt='loading...' width=\"20px\" />";  
    	var loadUrl = "<?=TMVC_BASEURL?>administrator/index.php/ajax_default";
    	
        $.ajaxSetup(
        {
            cache: false,
            beforeSend: function() {
                $('#loading').show();
            },
            complete: function() {
                $('#loading').hide();
                $('#content').show();
            },
            success: function() {
                $('#loading').hide();
                $('#content').show();
            }
        });
        var $container = $("#content");
        $container.load(loadUrl);
        setInterval(function() {
            $container.load(loadUrl);
        }, 5000);
    });
})(jQuery);
</script>
<div style="height: 50px;"><span id="loading"><img src='<?=TMVC_MEDIA_BASEURL?>image/loading.gif' alt='loading...' width="20px" /> loading...</span></div>
<div id="content"></div>

